<h1 class="page-header">
    <small>订单列表</small>
</h1>
<hr/>
<div class="panel panel-inverse" data-sortable-id="form-stuff-5">
    <div class="panel-heading">
        <h4 class="panel-title">订单查询</h4>
    </div>
    <div class="panel-body">
        <form id="orderForm" name="orderForm" method="post" class="form-inline">
            <div class="form-group m-r-10">
                <input type="text" class="form-control" name="EQ_mobile" value="${EQ_mobile}" placeholder="手机号">
            </div>
            <div class="form-group m-r-10">
                <input type="text" class="form-control" name="EQ_orderSn" value="${EQ_orderSn}"
                       placeholder="订单号">
            </div>
            <div class="form-group m-r-10">
                <select class="form-control" name="EQ_type" id="EQ_type">
                    <option value="">全部类型</option>
                    <#if typeList?has_content && typeList?exists>
                    <#list typeList as pf>
                    <option value="${pf.key}" <#if params.EQ_type== pf.key> selected</#if>>${pf.value}</option>
                    </#list>
                    </#if>
                </select>
            </div>
            <div class="form-group m-r-10">
                <select class="form-control" name="EQ_status" id="EQ_status">
                    <option value="">全部状态</option>
                    <#if statusList?has_content && statusList?exists>
                    <#list statusList as pf>
                    <option value="${pf.key}" <#if params.EQ_status== pf.key> selected</#if>>${pf.value}</option>
                    </#list>
                    </#if>
                </select>
            </div>
            <div class="form-group m-r-10">
                <select class="form-control" name="EQ_payStatus" id="EQ_payStatus">
                    <option value="">支付状态</option>
                    <#if payStatusList?has_content && payStatusList?exists>
                    <#list payStatusList as pf>
                    <option value="${pf.key}" <#if params.EQ_payStatus== pf.key> selected</#if>>${pf.value}</option>
                    </#list>
                    </#if>
                </select>
            </div>
            <button type="button" class="btn btn-sm btn-success" onclick="postDataByForm('backend/order/list','displayArea','orderForm')"><i class="fa fa-search"></i>查询</button>
            <button type="reset" class="btn btn-danger btn-sm">
                <i class="fa fa-remove"></i>
                重置
            </button>
        </form>
    </div>
</div>
<hr/>
<div class="panel panel-inverse" data-sortable-id="table-basic-4">
    <div class="panel-heading">
        <h4 class="panel-title">订单列表</h4>
    </div>
    <div class="panel-body">
        <table class="table table-stred table-bordered">
            <thead>
            <tr>
                <th>ID</th>
                <th style="text-align: center;">会员</th>
                <th>订单号</th>
                <th>类型</th>
                <th>总金额</th>
                <th>支付金额</th>
                <th>优惠金额</th>
                <th>创建时间</th>
                <th>支付时间</th>
                <th>订单状态</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <#if paginationResponse?has_content && paginationResponse.content?exists && paginationResponse.content?size gt 0>
                <#list paginationResponse.content as ct>
                    <tr>
                        <td>${ct.id}</td>
                        <td style="text-align: center;">
                            <#if ct.userInfo.name><p>${ct.userInfo.name}</p></#if>
                            <#if ct.userInfo.mobile><p>${ct.userInfo.mobile}</p></#if>
                        </td>
                        <td>${ct.orderSn}</td>
                        <td>${ct.typeName}</td>
                        <td>${ct.amount}</td>
                        <td>${ct.payAmount}</td>
                        <td><#if ct.discount>${ct.discount}<#else>0.00</#if></td>
                        <td>${ct.createTime}</td>
                        <td><#if ct.payTime>${ct.payTime}<#else>-</#if></td>
                        <td <#if ct.payStatus='B'>style="color:green;"</#if>>${ct.statusText}</td>
                        <td>
                            <a class="label label-success small-btn" href="javascript:getData('${rc.contextPath}/backend/order/detail/${ct.id}', 'displayArea');" title="详情"><i class="fa fa-eye"></i>详情</a>
                            <#if ct.type=='goods'><a class="label label-danger small-btn" href="javascript:getData('${rc.contextPath}/backend/order/delivered/${ct.id}', 'displayArea');" title="发货"><i class="fa fa-eye"></i>发货</a></#if>
                        </td>
                    </tr>
                </#list>
            <#else>
            <tr class="gradeA even" role="row">
                <td colspan="12" class="text-center">没有符合条件的数据！</td>
            </tr>
            </#if>
        </table>
    </div>
</div>

<!-- 分页组件 -->
<!-- recordBean 分页查询结果Bean
     action 分页请求URL
     formName 分页需要的查询参数的表单名称 -->
<@sp.pagination recordBean=paginationResponse action="${rc.contextPath}/backend/order/list" formName="orderForm"/>